<template>
  <view class="liaison-box">
    <view class="liaison-list">
        <liaison-item :liaison="liaisonList"></liaison-item>
    </view>
    <view class="liaison-but">
       <u-button class="liaison-button" @click="addLiaison" type="primary" shape="circle" >新增联系人</u-button>
    </view>
  </view>
</template>

<script>
import liaisonItem from '@/components/person/liaisonItem.vue'
import { mapActions,mapState } from 'vuex';


export default {
    components:{
        liaisonItem
    },
	data() {
		return {
			liaison:[]
		};
	},
	onLoad() {

	},
    computed:{
        ...mapState({
            liaisonList:state => state.person.liaisonList,
        })
    },
    onLoad() {
		this.getList()
	},
	methods: {
		...mapActions(['ActGetLiaisonList']),
        addLiaison(){
            uni.navigateTo({
                url:'./addLiaison'
            })
        },
        goEdit(){
            uni.navigateTo({
                url:'./editLiaison'
            })
        },
        async getList(){
            await this.ActGetLiaisonList()
        }
	},
};
</script>

<style lang="scss" scoped>
page {
	height: 100%;
	background-color: #f6f6f6;
}
.liaison-box{
.liaison-list{
    padding: 24rpx 0 275rpx 0;
}
.liaison-but{
	position:fixed;
	left: 0;
	bottom: 0;
    height: 100rpx;
    width: 100%;
    background-color: #fff;
        .liaison-button{
            padding-top: 12rpx;
        }
    }
}
</style>